using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for RequestXML
/// </summary>
public static class RequestXML
{
    public static String samlrequest = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
	<SOAP:Header>
		<wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>
			<wsse:UsernameToken xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>
				<wsse:Username>srkrishnan</wsse:Username>
				<wsse:Password>s</wsse:Password>
			</wsse:UsernameToken>
		</wsse:Security>
		<i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
			<locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
		</i18n:international>
	</SOAP:Header>
	<SOAP:Body>
		<samlp:Request xmlns:samlp='urn:oasis:names:tc:SAML:1.0:protocol' MajorVersion='1' MinorVersion='1' IssueInstant='2011-12-13T11:19:56Z' RequestID='a0c4220bb7-1658-a086-a0b6-8647a7e5ee2'>
			<samlp:AuthenticationQuery>
				<saml:Subject xmlns:saml='urn:oasis:names:tc:SAML:1.0:assertion'>
					<saml:NameIdentifier Format='urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified'>srkrishnan</saml:NameIdentifier>
				</saml:Subject>
			</samlp:AuthenticationQuery>
		</samlp:Request>
	</SOAP:Body>
</SOAP:Envelope>";

    public static String getUserDetailsRequest = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
  </SOAP:Header>
  <SOAP:Body>
    <GetUserDetails xmlns='http://schemas.cordys.com/1.0/ldap' />
  </SOAP:Body>
</SOAP:Envelope>";

    public static String searchLDAPRequest = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <SearchLDAP xmlns:xfr='http://schemas.cordys.com/1.0/xforms/runtime' xmlns='http://schemas.cordys.com/1.0/ldap'>
      <dn xmlns='http://schemas.cordys.com/1.0/ldap'></dn>
      <scope xmlns='http://schemas.cordys.com/1.0/ldap'>2</scope>
      <filter xmlns='http://schemas.cordys.com/1.0/ldap'>&amp;(objectclass=busorganizationaluser)(&amp;(!(cn=SYSTEM))(!(cn=anonymous))(!(cn=wcpLicUser)))(|(description=*)(description=*)(description=**)(&amp;(!(description=*))(|(cn=*)(cn=**)(cn=**))))</filter>
      <sort xmlns='http://schemas.cordys.com/1.0/ldap'>ascending</sort>
      <returnValues xmlns='http://schemas.cordys.com/1.0/ldap'>false</returnValues>
      <return xmlns='http://schemas.cordys.com/1.0/ldap' />
    </SearchLDAP>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String executeProcess = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/'>
        <DC xmlns='http://schemas.cordys.com/General/1.0/' name='initiator'>ASP Web Site</DC>
        <DC xmlns='http://schemas.cordys.com/General/1.0/' name='hopCount'>0</DC>
        <DC xmlns='http://schemas.cordys.com/General/1.0/' name='correlationID'>A0132D5C-2164-11E1-E4DB-8EEFFF1557E7</DC>
      </Logger>
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <ExecuteProcess xmlns='http://schemas.cordys.com/bpm/execution/1.0'>
      <type>definition</type>
      <receiver>ASP Business Process Model</receiver>
      <message>
        <InputMsg xmlns='http://schemas.cordys.com/default'>
          <MsgFromUser xmlns='http://schemas.cordys.com/default'>PARAMETER</MsgFromUser>
          <Managerdn xmlns='http://schemas.cordys.com/default'>cn=Manager,cn=organizational users,o=asporg,cn=cordys,cn=defaultInst,o=vanenburg.com</Managerdn>
        </InputMsg>
      </message>
      <source>Run from ASP Web Site</source>
    </ExecuteProcess>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String getTasks = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <GetTasks xmlns:xfr='http://schemas.cordys.com/1.0/xforms/runtime' xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      <TaskIdentifiers xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
        <TaskIdentifierType xmlns='http://schemas.cordys.com/notification/workflow/1.0' id='' name='' />
      </TaskIdentifiers>
      <Criteria xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
        <Query xmlns='http://schemas.cordys.com/notification/workflow/1.0'>  </Query>
        <Parameters xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
          
        </Parameters>
      </Criteria>
      <OrderBy xmlns='http://schemas.cordys.com/notification/workflow/1.0'>Task.DeliveryDate desc</OrderBy>
      <AssignedBy xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      </AssignedBy>
      <Target xmlns='http://schemas.cordys.com/notification/workflow/1.0' type='' />
      <ShowNonWorkableItems xmlns='http://schemas.cordys.com/notification/workflow/1.0'>false</ShowNonWorkableItems>
      <ReturnTaskData xmlns='http://schemas.cordys.com/notification/workflow/1.0'>false</ReturnTaskData>
      <cursor position='0' numRows='50' maxRows='50' />
    </GetTasks>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String getTask = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <GetTask xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      <TaskId>0026B99A-8244-11E1-E4F4-D0CA5DDEFF3A</TaskId>
      <RetrievePossibleActions>true</RetrievePossibleActions>
      <Target type='user'>cn=Manager,cn=organizational users,o=asporg,cn=cordys,cn=defaultInst,o=vanenburg.com</Target>
    </GetTask>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String performTaskAction = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <PerformTaskAction xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      <TaskId>0026B99A-8244-11E1-E4F4-D0CA5DDEFF3A</TaskId>
      <Action>COMPLETE</Action>
      <Data>
        <formoutputdata xmlns='http://schemas.cordys.com/1.0/xforms/processapi'>
          <freeformcontrols>
            <outputMsgFromUser display_name='Message from User'>Hello!!! 12345</outputMsgFromUser>
            <inputStatus display_name='Input1'>Approved</inputStatus>
            <buttonReject display_name='Reject'>Reject</buttonReject>
            <buttonApprove display_name='Approve'>Approve</buttonApprove>
          </freeformcontrols>
        </formoutputdata>
      </Data>
    </PerformTaskAction>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String getNotifications = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <GetNotifications xmlns:xfr='http://schemas.cordys.com/1.0/xforms/runtime' xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      <cursor xmlns='http://schemas.cordys.com/notification/workflow/1.0' numRows='50' />
      <TaskIdentifiers xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
        <TaskIdentifierType xmlns='http://schemas.cordys.com/notification/workflow/1.0' />
      </TaskIdentifiers>
      <Criteria xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
        <Query xmlns='http://schemas.cordys.com/notification/workflow/1.0' />
        <Parameters xmlns='http://schemas.cordys.com/notification/workflow/1.0' />
      </Criteria>
      <OrderBy xmlns='http://schemas.cordys.com/notification/workflow/1.0'>Notification.DeliveryDate desc</OrderBy>
      <ReturnNotificationData xmlns='http://schemas.cordys.com/notification/workflow/1.0'>false</ReturnNotificationData>
    </GetNotifications>
  </SOAP:Body>
</SOAP:Envelope>";

    public static String getNotification = @"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP:Header xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <header xmlns='http://schemas.cordys.com/General/1.0/'>
      <Logger xmlns='http://schemas.cordys.com/General/1.0/' />
    </header>
    <i18n:international xmlns:i18n='http://www.w3.org/2005/09/ws-i18n'>
      <locale xmlns='http://www.w3.org/2005/09/ws-i18n'>en-US</locale>
    </i18n:international>
  </SOAP:Header>
  <SOAP:Body>
    <GetNotification xmlns='http://schemas.cordys.com/notification/workflow/1.0'>
      <NotificationId>0026B99A-8244-11E1-E4F9-D10648027D57</NotificationId>
    </GetNotification>
  </SOAP:Body>
</SOAP:Envelope>";
}
